//
// Created by HJ on 2024-08-24.
//

#ifndef MYAPPLICATION_XARRAY_H
#define MYAPPLICATION_XARRAY_H
#include <string>
#include <vector>
#include <jni.h>

class XArray {
public:
    bool Init(JNIEnv *env);
    std::vector<std::string> ToVS(jobject arr);

    jobject ToArrayList(std::vector<std::string> vs);

private:
    JNIEnv *env_ = nullptr;
    jclass cla_ = nullptr;
    jmethodID get_ = nullptr;
    jmethodID size_ = nullptr;
    jmethodID init_ = nullptr;
    jmethodID add_ = nullptr;
};


#endif //MYAPPLICATION_XARRAY_H
